Cytosim  PI
Cytoskeleton Simulator
Bead Class Reference

Detailed Description

The Bead is the simplest Mecable. It represents a spherical object using:

  • a position vector,
  • a radius.

The orientational degrees of freedom are neglected. Translation follows Stokes's law. A Single can be attached in the center of the bead.

For more elaborate models, see Sphere and Solid.

Inheritance diagram for Bead:
Mecable Object Buddy Node Inventoried Movable

Public Member Functions

 Bead (BeadProp const *, Vector pos, real rad)
 create following specifications
 
virtual ~Bead ()
 destructor
 
Vector position () const
 return the position in space of the object
 
bool translatable () const
 true if object accepts translations (default=false)
 
void translate (Vector const &w)
 move the object position ( position += given vector )
 
void setPosition (Vector const &w)
 set the object position ( position = given vector )
 
void foldPosition (const Modulo *)
 modulo the position (periodic boundary conditions)
 
real radius () const
 the radius of the Bead
 
real radiusSqr () const
 the volume of the bead
 
void resize (real R)
 set the radius of the Bead
 
real volume () const
 the volume of the bead
 
unsigned int nbPoints () const
 can only have one point
 
Vector posP (unsigned n) const
 return position of point
 
void putPoints (real *x) const
 copy coordinates to given array
 
void getPoints (const real *x)
 set position
 
Vector netForceP (unsigned n) const
 return Force on point x calculated at previous step by Brownian dynamics
 
void getForces (const real *x)
 replace current forces by the ones provided
 
void setDragCoefficient ()
 sets the mobility More...
 
real dragCoefficient () const
 the total drag-coefficient of object (force = drag * speed)
 
void prepareMecable ()
 sets the mobility (called at every step) More...
 
void setSpeedsFromForces (const real *X, real *Y, real, bool) const
 calculates the speed of points in Y, for the forces given in X More...
 
real addBrownianForces (real *rhs, real sc) const
 add contribution of Brownian forces
 
void setInteractions (Meca &) const
 add the interactions due to confinement
 
void step ()
 monte-carlo step
 
Beadnext () const
 a static_cast<> of Node::next()
 
Beadprev () const
 a static_cast<> of Node::prev()
 
Tag tag () const
 return unique character identifying the class
 
const Propertyproperty () const
 return Object Property
 
void read (InputWrapper &, Simul &)
 read from file
 
void write (OutputWrapper &) const
 write to file
 
- Public Member Functions inherited from Mecable
 Mecable ()
 The constructor resets the pointers.
 
virtual ~Mecable ()
 Destructor de-allocates memory.
 
virtual Vector posP (unsigned int P) const =0
 return position of point P
 
virtual void putPoints (real[]) const =0
 copy current coordinates to provided array
 
virtual void getPoints (const real[])=0
 replace current coordinates of points by values from the provided array
 
virtual Vector netForceP (unsigned int p) const =0
 return Force on point p calculated at previous step by Brownian dynamics
 
virtual void getForces (const real[])=0
 replace current forces by the ones provided
 
void matIndex (Matrix::index_type index)
 Store the index where coordinates are located in Meca.
 
Matrix::index_type matIndex () const
 Index in mB of the first point. the index in the vectors is DIM*matIndex() More...
 
bool useBlock () const
 Tell Meca to use preconditionning on this object or not.
 
void useBlock (bool b)
 change preconditionning flag
 
realallocateBlock (unsigned)
 Allocate a block of the requested size.
 
realblock () const
 return allocated block
 
virtual void addRigidity (const real *X, real *Y) const
 Add rigidity terms Y <- Y + Rigidity * X. More...
 
virtual void addRigidityMatUp (Matrix &mB, int offset) const
 Add rigidity matrix elements (which should be symmetric) to provided matrix. More...
 
virtual void makeProjectionDiff (const real *forces)
 set the terms obtained from the linearization of the Projection operator, from the given forces More...
 
virtual void addProjectionDiff (const real *X, real *Y) const
 add terms from projection correction terms: Y <- Y + P' * X; More...
 
- Public Member Functions inherited from Object
 Object ()
 constructor
 
std::string reference () const
 concatenation of [ tag(), property()->index(), number() ] in plain ascii More...
 
void writeReference (OutputWrapper &) const
 write a reference that identifies the Object uniquely More...
 
void writeReference (OutputWrapper &, Tag tag) const
 write a reference, but using the provided Tag More...
 
int mark () const
 birth mark value
 
void mark (int m)
 set birth mark
 
int fleck () const
 fleck value (not stored in trajectory files)
 
void fleck (int f) const
 set fleck (the value is not stored in trajectory files)
 
Objectnext () const
 extends Node::next(), with a cast to preserve type
 
Objectprev () const
 extends Node::prev(), with a cast to preserve type
 
- Public Member Functions inherited from Node
 Node ()
 constructor set as unlinked
 
virtual ~Node ()
 destructor More...
 
bool linked () const
 true if Node is linked
 
Nodenext () const
 the next Node in the list, or zero if this is last
 
Nodeprev () const
 the previous Node in the list, or zero if this is first
 
NodeListlist () const
 the list where the object is linked, or zero
 
ObjectSetobjset () const
 return associated ObjectSet
 
- Public Member Functions inherited from Inventoried
 Inventoried ()
 initialize (name=0)
 
 ~Inventoried ()
 destructor
 
void number (Number n)
 change the serial number
 
Number number () const
 serial number : a integer identifier, unique within each class
 
- Public Member Functions inherited from Movable
 Movable ()
 constructor
 
virtual ~Movable ()
 destructor
 
virtual bool rotatable () const
 true if object accepts rotations (default=false)
 
virtual void rotate (Rotation const &)
 rotate the object around the origin of coordinates More...
 
virtual void rotateP (Rotation const &)
 rotate the object around its current position More...
 
- Public Member Functions inherited from Buddy
virtual ~Buddy ()
 upon destruction, goodbye is called for all buddies
 
void hello (Buddy *b)
 will make this and b mutual buddies
 
virtual void goodbye (Buddy *)
 this is called everytime a known buddy is destroyed
 
Buddybuddy (unsigned int ix) const
 return buddy at index ix
 
void buddy (Buddy *b, unsigned int ix)
 replace the buddy that may have been at index ix
 

Public Attributes

BeadProp const * prop
 Property.
 

Static Public Attributes

static const Tag TAG = 'b'
 a unique character identifying the class
 
- Static Public Attributes inherited from Object
static const Tag TAG = 'v'
 Object::TAG = 'v' represents the 'void' pointer.
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static std::string strReference (char, int, Number, int)
 build a string reference by concatenating (tag, property_index, number, mark) More...
 
static void readReference (InputWrapper &, int &, Number &, int &, char pretag)
 read a reference (property_index, number, mark) from input More...
 
static void writeNullReference (OutputWrapper &)
 write a reference that does not refer to any Object
 
- Static Public Member Functions inherited from Movable
static Vector readPrimitive (std::istream &, const Space *)
 read a position specified with primitives, such as 'circle 5', etc. More...
 
static Vector readPosition (std::istream &, const Space *)
 read a position in space More...
 
static Vector readDirection (std::istream &, const Vector &, const Space *)
 read an orientation, and return a normalized vector More...
 
static Rotation readRotation (std::istream &, const Vector &, const Space *)
 read a rotation specified in is, at position pos More...
 
- Protected Attributes inherited from Node
NodenNext
 the next Node in the list
 
NodenPrev
 the previous Node in the list
 
- Protected Attributes inherited from Inventoried
Number nNumber
 object identifier, unique within the class defined by tag()
 

Member Function Documentation

void prepareMecable ( )
inlinevirtual

setDragCoefficient() is called when the Bead is created, or when it is resized, and nothing needs to be done here.

Implements Mecable.

void setDragCoefficient ( )
virtual

Bead follow Stokes' law.

Translation:

muT = 6*M_PI*viscosity*soRadius[pp];
muT * dx/dt = force

Rotation:

muR = 8*M_PI*viscosity*cub(soRadius[pp])
muR * d(angle)/dt = momentum-of-forces

Implements Mecable.

void setSpeedsFromForces ( const real X,
real Y,
real  sc,
bool   
) const
virtual

The projection is trivial

Implements Mecable.